import React from 'react'
import {RouteWithSubRoutes} from '../App';

import Banner from './Banner'

import {NavLink, Route,Switch, Redirect, withRouter} from 'react-router-dom'


const Home = ({routes}) => {
  return (
    <div>

      <Banner/>

      <div 
        style={{width:'78%',position:'absolute',top:'55px',left:'22%'}}
      >
      {routes.map((route, i) => (
            <RouteWithSubRoutes key={i} {...route} />
        ))}
      </div>

    </div>
  )
}

export default withRouter(Home);
